package cn.cqs.redisitem.utils;

import cn.cqs.redisitem.Pojo.Person;
import cn.cqs.redisitem.service.AllConditional;
import cn.cqs.redisitem.service.LinuxConditional;
import cn.cqs.redisitem.service.WindowsConditional;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
@Conditional({LinuxConditional.class, AllConditional.class})
//@Conditional(WindowsConditional.class)
@Configuration
public class BeanConfig {
//    @Conditional(WindowsConditional.class)
    @Bean(name = "bibi")
    public Person person1(){
        Person person = new Person("bibi",12);
        return person;
    }
//    @Conditional(LinuxConditional.class)
    @Bean(name = "si")
    public Person person2(){
        Person person = new Person("si",25);
        return person;
    }
}
